#include <vector>
#include <iostream>
#include "../../include/ConstantMemory.hpp"
#include "../../include/GlobalMemory.hpp"

using namespace std;

extern void launchKernel(CH::GlobalMemory<int> & result_d);

/************************************************************************/
/* main                                                                 */
/************************************************************************/

int main(int argc, char* argv[])
{
	///space to contain result
	CH::GlobalMemory<int> result_d(3);

	///constant assembled in host memory
	std::vector<int> cons_h(3);
	cons_h[0] = 1;
	cons_h[1] = 2;
	cons_h[2] = 3;

	int a = 888;

	///create constants on device
	CH::CreateConstantMemory("cons_d", cons_h); //size of cons_d and cons_h should be the same!!
	CH::CreateConstantMemory("diff", a);

	launchKernel(result_d);

	result_d.dump_to_screen();

	return 0;
}
